//
//  TopCell.m
//  HuiWenMovie
//
//  Created by niceDay on 15/7/21.
//  Copyright (c) 2015年 computer. All rights reserved.
//

#import "TopCell.h"

@implementation TopCell

- (void)awakeFromNib {
   
}

- (void)setModal:(TopModal *)modal{
    _modal = modal;
    [self setNeedsLayout];
}

- (void)layoutSubviews{
    _titleLable.text = _modal.title;
//    _titleLable.textColor = [UIColor whiteColor];
//    [_titleLable sizeToFit];
    _titleLable.font = [UIFont systemFontOfSize:15];
    _titleLable.textAlignment =  NSTextAlignmentCenter ;
    _starView.average = _modal.average;
    
    _averageLable.text = [NSString stringWithFormat:@"%.1f",_modal.average];
    _averageLable.textColor = [UIColor whiteColor];
    _averageLable.font = [UIFont systemFontOfSize:11];
    NSString *imageStr = _modal.images[@"small"];
    [_bgImage sd_setImageWithURL:[NSURL URLWithString:imageStr]];
    
}
@end
